package com.unpay.skb.requests;

import com.unpay.skb.responses.ConsumptionResponse;
import com.unpay.skb.util.Config;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;

/**
 * 消费
 */
public class ConsumptionRequest extends UnpayRequest<ConsumptionResponse>{
    private String orderId;//商户交易订单号
    private String txnAmt;//交易金额
    private String unionpayMerId;//银联商户号
    private String unionpayMerName;//银联商户名称
    private String merCatCode;//MCC码
    private String unionpayMerAbbr;//银联商户简称
    private String subMerId;//子商户号
    private String proxyCode= Config.instance().getProxyCode();//代理账号
    private String idName;//持卡人姓名
    private String accNo;//交易卡号
    private String phoneNo;//手机号
    private String idNo;//身份证号
    private String frontUrl;//前台通知地址
    private String txnType="01";//交易类型
    private String txnSubType="01";//交易子类
    private String channelType="07";//渠道类型
    private String backUrl;//后台通知地址
    private String txnTime;//订单发送时间
    private String reqReserved;//请求方保留域
    private String payTimeout;//订单支付超时时间
    private String frontFailUrl;//失败交易前台跳转地址
    private String txMerCommisionValue;//商户T1提现手续费率(%)
    private String settType;//结算类型
    private String reserved;//扩展域

    public Map<String,String> signedData() throws IllegalAccessException, IntrospectionException, InvocationTargetException {
        return requestData();
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getTxnAmt() {
        return txnAmt;
    }

    public void setTxnAmt(String txnAmt) {
        this.txnAmt = txnAmt;
    }

    public String getUnionpayMerId() {
        return unionpayMerId;
    }

    public void setUnionpayMerId(String unionpayMerId) {
        this.unionpayMerId = unionpayMerId;
    }

    public String getUnionpayMerName() {
        return unionpayMerName;
    }

    public void setUnionpayMerName(String unionpayMerName) {
        this.unionpayMerName = unionpayMerName;
    }

    public String getMerCatCode() {
        return merCatCode;
    }

    public void setMerCatCode(String merCatCode) {
        this.merCatCode = merCatCode;
    }

    public String getUnionpayMerAbbr() {
        return unionpayMerAbbr;
    }

    public void setUnionpayMerAbbr(String unionpayMerAbbr) {
        this.unionpayMerAbbr = unionpayMerAbbr;
    }

    public String getSubMerId() {
        return subMerId;
    }

    public void setSubMerId(String subMerId) {
        this.subMerId = subMerId;
    }

    public String getProxyCode() {
        return proxyCode;
    }

    public String getIdName() {
        return idName;
    }

    public void setIdName(String idName) {
        this.idName = idName;
    }

    public String getAccNo() {
        return accNo;
    }

    public void setAccNo(String accNo) {
        this.accNo = accNo;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getFrontUrl() {
        return frontUrl;
    }

    public void setFrontUrl(String frontUrl) {
        this.frontUrl = frontUrl;
    }

    public String getTxnType() {
        return txnType;
    }

    public void setTxnType(String txnType) {
        this.txnType = txnType;
    }

    public String getTxnSubType() {
        return txnSubType;
    }

    public void setTxnSubType(String txnSubType) {
        this.txnSubType = txnSubType;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public String getBackUrl() {
        return backUrl;
    }

    public void setBackUrl(String backUrl) {
        this.backUrl = backUrl;
    }

    public String getTxnTime() {
        return txnTime;
    }

    public void setTxnTime(String txnTime) {
        this.txnTime = txnTime;
    }

    public String getReqReserved() {
        return reqReserved;
    }

    public void setReqReserved(String reqReserved) {
        this.reqReserved = reqReserved;
    }

    public String getPayTimeout() {
        return payTimeout;
    }

    public void setPayTimeout(String payTimeout) {
        this.payTimeout = payTimeout;
    }

    public String getFrontFailUrl() {
        return frontFailUrl;
    }

    public void setFrontFailUrl(String frontFailUrl) {
        this.frontFailUrl = frontFailUrl;
    }

    public String getTxMerCommisionValue() {
        return txMerCommisionValue;
    }

    public void setTxMerCommisionValue(String txMerCommisionValue) {
        this.txMerCommisionValue = txMerCommisionValue;
    }

    public String getSettType() {
        return settType;
    }

    public void setSettType(String settType) {
        this.settType = settType;
    }

    public String getReserved() {
        return reserved;
    }

    public void setReserved(String reserved) {
        this.reserved = reserved;
    }

    @Override
    public Class<ConsumptionResponse> responseClass() {
        return ConsumptionResponse.class;
    }
}
